Page({
    data: {
        serachValue: '',
        serachValues: ['', '', ''], //搜索框内容缓存数组
        active: 0,
        qiugou_list_null: false, //当前求购列表为空显示空状态
        DialogShow: false
    },
    onChange(event) {
        const index = event.detail.name
        this.setData({ active: index })
        this.setData({ serachValue: this.data.serachValues[index] })

        wx.showToast({
            title: `切换到标签 ${event.detail.name}`,
            icon: 'none',
        });
    },
    searchChange() {
        this.setData({
            ['serachValues[' + this.data.active + ']']: this.data.serachValue
        })
    },
    searchClear() {
        this.setData({
            ['serachValues[' + this.data.active + ']']: ''
        })
    },
    cancelQiugou() {
        this.setData({ DialogShow: true })
    },
    confirm() {
        console.log('点击确定');
    },
    onClose() {
        this.setData({ DialogShow: false });
    }
})